#!/dis/sh
(earlier later null) = $*
(eY eM eD eh em es) = `{echo $earlier | sed 's,(....)(..)(..)\.(..)(..)(..),\1 \2 \3 \4 \5 \6,'}
(lY lM lD lh lm ls) = `{echo $later | sed 's,(....)(..)(..)\.(..)(..)(..),\1 \2 \3 \4 \5 \6,'}
(dD dh dm ds) = 0 0 0 0

load expr
ds = ${expr $ls $es -}
if {~ ${expr $ds 0 lt} 1} {
	ds = ${expr $ds 60 +}
	dm = -1
}
dm = ${expr $dm $lm $em - +}
if {~ ${expr $dm 0 lt} 1} {
	dm = ${expr $dm 60 +}
	dh = -1
}
dh = ${expr $dh $lh $eh - +}
if {~ ${expr $dh 0 lt} 1} {
	dm = ${expr $dh 24 +}
	dD = -1
}
dD = ${expr $dD $lD $eD - +}

if {~ ${expr $ds 10 lt} 1} {ds = 0^$ds}
if {~ ${expr $dm 10 lt} 1} {dm = 0^$dm}
if {~ ${expr $dh 10 lt} 1} {dh = 0^$dh}
echo $dh $dm $ds
